import { createSSRApp } from 'vue'
import App from './App.vue'
import 'uno.css'
import router from './router'

export function createApp() {
  const app = createSSRApp(App)
  app.use(router)
  return {
    app,
  }

  uni.getSetting({
    success: function (res) {
      if (!res.authSetting['scope.camera']) {
        uni.authorize({
          scope: 'scope.camera',
          success() {
            // 用户已经同意授权相机权限
          },
          fail() {
            // 用户拒绝授权相机权限
          }
        });
      }
    }
  });

}
